FROM openjdk:8
WORKDIR /app
ENV TZ=Asia/Shanghai
ENV JAVA_OPTS="-Xms256m -Xmx512m -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom"
ENV NACOS_HOST=""
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime  && echo $TZ > /etc/timezone
ADD ./target/mq-simple*.jar ./mq-simple.jar
ENTRYPOINT exec java $JAVA_OPTS -jar mq-simple.jar NACOS_HOST=$NACOS_HOST